<template>
    <div class="detailBody">
        <div class="detailTitle">{{idList.name}}</div>
        <div class="detailTitleDate">{{idList.date}}</div>
        <!-- <div class="detailImage">
            <img :src="idList.img" alt="">
        </div> -->
        <!-- <p class="detailTextBody" v-for="(item,index) in idList.textBody" :key="index" v-html="{ item }"></p> -->
        <p class="detailTextBody" v-html="idList.textBody"></p>
    </div>
</template>

<script>
export default {
    name: 'View2Detail',

    data() {
        return {
        };
    },
    props:['idList'],

    created() {
    },

    methods: {
        xxsj(data) {
            // console.log(data);
            // return data.map((item) => item.replace(/\r/g, "").replace(/^"([\s\S]*?)"$/, '$1'));
            // const regex = /^"([\s\S]*?)"$/; // 匹配双引号包裹的内容
            // console.log(rawData.replace(regex, '$1').replace(/\r/g, '')); // 去掉双引号和\r字符
        }
    },
};
</script>

<style scoped>
.detailBody{
    width: 100%;
    height: auto;
    word-wrap: break-word;
}
.detailTitle{
    border-bottom: 0.125rem solid #eee;
    padding: 0 0 0.625rem 1rem;
    font-size: 1.4rem;
    font-weight: bold;
}
.detailTitleDate{
    font-size: 0.8rem;
    color: #666666;
    margin: 0.2rem 1rem 0 0.625rem;
    float: right;
}
.detailImage{
    margin: 3rem auto;
    width: 40rem;
    height: 25rem;
}
.detailImage img{
    width: 100%;
    height: 100%;
}
.detailTextBody{
    text-indent: 2em;
    color: #333333;
    margin: 0.625rem 0;
    line-height: 1.7rem;
}
</style>